package com.zyf.springboot.mapper;

import com.zyf.springboot.entity.Book;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface BookMapper {
//    @Select("select * from book where bookName like %#{Name}%")
//    public String selectByName(String Name);

    @Select("select * from book")
    public List<Book> selectAll();
    @Insert("insert into book values(#{bookName},#{time},#{thisNull})")
    public void outBook(@Param("bookName") String bookName, @Param("time") String  time,@Param("thisNull") String thisNull);
    @Update("update book set in_time=#{time} where book_name=#{bookName} ")
    public void inBook(@Param("bookName") String bookName, @Param("time") String  time);
}
